Add a separate --ignore-theme-index option to avoid overloading --force.
authorMatthias Clasen <mclasen@redhat.com>
Fri, 26 Aug 2005 19:05:31 +0000 (19:05 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 26 Aug 2005 19:05:31 +0000 (19:05 +0000)
2005-08-26  Matthias Clasen  <mclasen@redhat.com>

* gtk/updateiconcache.c: Add a separate --ignore-theme-index option
to avoid overloading --force.  (JP Rosevaar)

ChangeLog
ChangeLog.pre-2-10
docs/reference/ChangeLog
docs/reference/gtk/gtk-update-icon-cache.1
docs/reference/gtk/gtk-update-icon-cache.xml
gtk/updateiconcache.c

index c486e84a9405ccd2f5b7cc60f8ea878a475bd3e8..c872f2649d17fd3edaa72f6a696428acea297998 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-26  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/updateiconcache.c: Add a separate --ignore-theme-index option
+       to avoid overloading --force.  (JP Rosevaar)
+
 2005-08-26  Matthias Clasen  <mclasen@redhat.com>
 
        * configure.in: Bump version to 2.9.0
index c486e84a9405ccd2f5b7cc60f8ea878a475bd3e8..c872f2649d17fd3edaa72f6a696428acea297998 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-26  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/updateiconcache.c: Add a separate --ignore-theme-index option
+       to avoid overloading --force.  (JP Rosevaar)
+
 2005-08-26  Matthias Clasen  <mclasen@redhat.com>
 
        * configure.in: Bump version to 2.9.0
index 35e472b3166cea62ba6dbc6874e644688efcb126..1c3dafad2c64494c2ff30eb2925bc7067f348702 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-26  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtk-update-icon-cache.xml: 
+       * gtk/gtk-update-icon-cache.1: Updates.
+
 2005-08-26  Matthias Clasen  <mclasen@redhat.com>
 
        * gdk-pixbuf/gdk-pixbuf.sgml: 
index 8f8707eab0f4bccc86a16ef41c3204b0b821a78a..8f563d083b806e81189cc0703a3122a6e7a29482 100644 (file)
@@ -2,7 +2,7 @@
 .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
 .\" Instead of manually editing it, you probably should edit the DocBook XML
 .\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "GTK\-UPDATE\-ICON\-CACH" "1" "08/23/2005" "" ""
+.TH "GTK\-UPDATE\-ICON\-CACH" "1" "08/26/2005" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -11,7 +11,7 @@
 gtk\-update\-icon\-cache \- Icon theme caching utility
 .SH "SYNOPSIS"
 .HP 22
-\fBgtk\-update\-icon\-cache\fR [\-\-force] [\-\-index\-only] [\-\-quiet] {iconpath}
+\fBgtk\-update\-icon\-cache\fR [\-\-force] [\-\-index\-only] [\-\-ignore\-theme\-index] [\-\-quiet] {iconpath}
 .SH "DESCRIPTION"
 .PP
 \fBgtk\-update\-icon\-cache\fR
@@ -31,6 +31,11 @@ to avoid a lot of system call and disk seek overhead when the application starts
 \-\-force, \-f
 Overwrite an existing cache file even if it appears to be uptodate.
 .TP
+\-\-ignore\-theme\-index, \-t
+Don't check for the existence of 'index.theme' in the icon theme directory. Without this option,
+\fBgtk\-update\-icon\-cache\fR
+refuses to create an icon cache in a directory which does not appear to be the toplevel directory of an icon theme.
+.TP
 \-\-index\-only, \-i
 Don't include image data in the cache.
 .TP
index 4c2afa4e0194a12007c99580cad12602e947ec41..726c0fb1616826cb7a98bd27721b54f1c406c0b6 100644 (file)
@@ -15,6 +15,7 @@
 <command>gtk-update-icon-cache</command>
 <arg choice="opt">--force</arg>
 <arg choice="opt">--index-only</arg>
+<arg choice="opt">--ignore-theme-index</arg>
 <arg choice="opt">--quiet</arg>
 <arg choice="req">iconpath</arg>
 </cmdsynopsis>
@@ -47,6 +48,16 @@ multiple applications, the overall memory consumption is reduced as well.
     </para></listitem>
   </varlistentry>
 
+  <varlistentry>
+    <term>--ignore-theme-index</term>
+    <term>-t</term>
+    <listitem><para>Don't check for the existence of 'index.theme' in the icon theme
+     directory. Without this option, <command>gtk-update-icon-cache</command> refuses
+     to create an icon cache in a directory which does not appear to be the toplevel
+     directory of an icon theme. 
+    </para></listitem>
+  </varlistentry>
+
   <varlistentry>
     <term>--index-only</term>
     <term>-i</term>
index 2da6d00330ba82c993a1789d1288752b44d62e8a..468f31a75967a07c46d30f078863ffaaf0cd26c7 100644 (file)
@@ -39,6 +39,7 @@
 #include <gdk-pixbuf/gdk-pixdata.h>
 
 static gboolean force_update = FALSE;
+static gboolean ignore_theme_index = FALSE;
 static gboolean quiet = FALSE;
 static gboolean index_only = FALSE;
 
@@ -1208,6 +1209,7 @@ build_cache (const gchar *path)
 
 static GOptionEntry args[] = {
   { "force", 'f', 0, G_OPTION_ARG_NONE, &force_update, "Overwrite an existing cache, even if uptodate", NULL },
+  { "ignore-theme-index", 't', 0, G_OPTION_ARG_NONE, &ignore_theme_index, "Don't check for the existence of index.theme", NULL },
   { "index-only", 'i', 0, G_OPTION_ARG_NONE, &index_only, "Don't include image data in the cache", NULL },
   { "quiet", 'q', 0, G_OPTION_ARG_NONE, &quiet, "Turn off verbose output", NULL },
   { NULL }
@@ -1232,10 +1234,10 @@ main (int argc, char **argv)
   path = g_locale_to_utf8 (path, -1, NULL, NULL, NULL);
 #endif
   
-  if (!force_update && !has_theme_index (path))
+  if (!ignore_theme_index && !has_theme_index (path))
     {
       g_printerr ("No theme index file in '%s'.\n"
-                 "If you really want to create an icon cache here, use --force.\n", path);
+                 "If you really want to create an icon cache here, use --ignore-theme-index.\n", path);
       return 1;
     }